package com.yenlien.traceyun.business.entity;

import com.yenlien.traceyun.webase.entity.BaseIdEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import java.util.Objects;

/**
 * @author: bigwangy@sina.com
 * @create: 2020-12-16
 * @description:
 **/
@Entity(name = "t_recall_chain")
public class RecallChain extends BaseIdEntity {

    /**
     * 产品名称
     */
    @Column(name = "product_name", length = 30)
    private String productName;

    /**
     * 追溯步骤
     */
    @Column(name = "trace_step", length = 30)
    private String traceStep;

    /**
     * 规格
     */
    @Column(name = "spec", length = 30)
    private String spec;


    /**
     * 客户名称,多个用，分隔
     */
    @Column(name = "client_name", length = 5000)
    private String clientName;

    /**
     * 召回id
     */
    @Column(name = "recall_id", length = 8)
    private int recallId;

    /**
     * 批次号
     */
    private String batch;

    /**
     * 召回数量
     */
    @Column(name = "num", length = 9)
    private String num;

    /**
     * 分支branch
     */
    private String branch;

    /**
     * 分包id,或者采购id
     */
    private String relateId;

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getTraceStep() {
        return traceStep;
    }

    public void setTraceStep(String traceStep) {
        this.traceStep = traceStep;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public int getRecallId() {
        return recallId;
    }

    public void setRecallId(int recallId) {
        this.recallId = recallId;
    }

    public String getBatch() {
        return batch;
    }

    public void setBatch(String batch) {
        this.batch = batch;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getBranch() {
        return branch;
    }

    public void setBranch(String branch) {
        this.branch = branch;
    }

    public String getRelateId() {
        return relateId;
    }

    public void setRelateId(String relateId) {
        this.relateId = relateId;
    }

    //    @Override
//    public boolean equals(Object o) {
//        if (this == o) return true;
//        if (!(o instanceof RecallChain)) return false;
//        RecallChain chain = (RecallChain) o;
//        return traceStep.equals(chain.traceStep) &&
//                branch.equals(chain.branch);
//    }
//
//    @Override
//    public int hashCode() {
//        return Objects.hash(traceStep, branch);
//    }
}
